#include "SurvexParser.h"

SurvexParser::SurvexParser() {

}

//!Parses survex files
Survey* SurvexParser::ParseFile(std::string& fileName) {

    //Clear all the errors
    Errors.clear();

    //Start parsing
    Survey* rootSurvey = new rootSurvey();






    //Delete the survey if there was any errors
    if(Errors.size() > 0) {
        delete rootSurvey;
        return NULL;
    }
    return rootSurvey;
}

//!Gets all the error for the parser, syntax error
std::list<std::string> SurvexParser::GetErrors() {
    return Errors;
}
